//
//  GHShopCell.swift
//  Browser
//
//  Created by 刘光华 on 16/4/28.
//  Copyright © 2016年 liuguanghua. All rights reserved.
//

import UIKit
import SDWebImage

class GHShopCell: UICollectionViewCell {
    
    @IBOutlet weak var imageView: UIImageView!
    
    var shop: GHShop?{
        didSet{
            
            // 过滤空值
            guard let urlString = shop?.q_pic_url else {
                return
            }
            
            // 创建url
            let imageURL = NSURL(string: urlString)
            
            // 设置图片
            imageView.sd_setImageWithURL(imageURL, placeholderImage: UIImage(named: "empty_picture"))
            
            
        }
        
    }
    
}
